#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif


#define PIN           43
#define NUMPIXELS     8    
#define DELAYVAL      500  
    
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
byte status = LOW;
int BASE = 0x0;
unsigned int i = 0;
int color[8] = {0xef5b9c,0xb2d235,0x009ad6,0x33a3dc,0x2585a6,0x8f4b38,0xffc20e,0x293047};
void click();
void setup() {

#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  attachInterrupt(digitalPinToInterrupt(21),click,CHANGE);
  pixels.setBrightness(5);
  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
  pixels.clear();
  pixels.show();
}

void loop() {
  pixels.begin();
  if(status == HIGH){ 
    pixels.setPixelColor(i,color[i]);
    i++;
    if(i == 9){i=0;pixels.clear();}
    pixels.show();
    delay(500);  
  }  
}

void click()
{
  status = !status;
}
